<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/16
 * Time: 14:03
 */

namespace App\Utility;

use EasySwoole\Config;
use EasySwoole\Core\Component\Di;

class Db
{
    private $db;

    function __construct()
    {
        $this->db = Di::getInstance()->get("MYSQL");
        $dbconf = Config::getInstance()->getConf('database');
        $this->db->setPrefix($dbconf['prefix']);
    }

    function dbConnector()
    {
        return $this->db;
    }
}